home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-09 | 2.0 KB | 112 lines | [TEXT/MPS ] |
- ### File RezC.CNTL
- ### Generate Rez input for a Control Resource
- ### WGP 1988
-
- Set Exit 0
- Set rtyp 'CNTL'
- If {#} < 10
- Echo "### {0} Error: Bad arguments, use commando">>Dev:StdErr
- Exit 1
- End
- Set rid {1}
- Shift 1
- Echo -n "Resource ∂'{rtyp}∂' ({rid}"
- If "{1}" == "-nms"
- Set rname "{2}"
- If ("{rname}" != "")
- Echo -n ,∂""{rname}"∂"
- End
- Shift 2
- End
- If "{1}" == "-t"
- Set tr {2}
- Shift 2
- Else
- Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
- Exit 1
- End
- If "{1}" == "-l"
- Set lr {2}
- Shift 2
- Else
- Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
- Exit 1
- End
- If "{1}" == "-b"
- Set br {2}
- Shift 2
- Else
- Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
- Exit 1
- End
- If "{1}" == "-r"
- Set rr {2}
- Shift 2
- Else
- Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
- Exit 1
- End
- Set Vis "{1}"
- Shift 1
- If "{1}" == "-const"
- Set RefCon "{2}"
- Shift 2
- Else
- Set RefCon 0
- End
- If "{1}" == "-label"
- Set Label "{2}"
- Shift 2
- Else
- Set Label ""
- End
-
- If ( "{1}" == "-sy" ) ; Echo -n ",SysHeap" ; Shift ; End
- If ( "{1}" == "-pu" ) ; Echo -n ",Purgeable" ; Shift ; End
- If ( "{1}" == "-lo" ) ; Echo -n ",Locked" ; Shift ; End
- If ( "{1}" == "-Pr" ) ; Echo -n ",Protected" ; Shift ; End
- If ( "{1}" == "-PL" ) ; Echo -n ",PreLoad" ; Shift ; End
- Echo ") ∂{"
- Echo "∂t∂{{tr},{lr},{br},{rr}∂},∂t∂t∂/* Bounds Rect *∂/"
-
- If "{1}" == "-P"
- Set ProcID 0
- Else If "{1}" == "-C"
- Set ProcID 1
- Else If "{1}" == "-R"
- Set ProcID 2
- Else If "{1}" == "-S"
- Set ProcID 16
- Else
- Echo "### {0} Error: Unknown ProcID for control">>Dev:StdErr
- Exit 1
- End
- Shift 1
- If "{1}" == "-W"
- Set WFont 8
- Shift 1
- Else
- Set WFont 0
- End
- IF {ProcID} != 16
- Set ProcID `Evaluate {ProcID} + {WFont} `
- End
- Set Value {1}
- Set Min {2}
- Set Max {3}
- Echo "∂t{Value},∂t∂t∂/* Value *∂/"
- If "{Vis}" == "-I"
- Echo "∂tInvisible,"
- Else
- Echo "∂tVisible,"
- End
- Echo "∂t{Max},∂t∂t∂/* Maximum *∂/"
- Echo "∂t{Min},∂t∂t∂/* Minimum *∂/"
- Echo "∂t{ProcID},∂t∂t∂/* ProcID *∂/"
- Echo "∂t{RefCon},∂t∂t∂/* RefCon *∂/"
- Echo "∂t∂"{Label}∂""
- Echo "∂};"
- Exit 0
-
-
-